<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>意见&建议列表</title>
	<link href="__PUBLIC__/admin/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.js"></script>

	<link href="__PUBLIC__/admin/css/select.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>

        <script type="text/javascript">
            $(document).ready(function (e) {
                $("#red_type").uedSelect({
                    width: 150
                });
            });
			//弹出意见&建议详情
            function showadvice(advice_id, title) {
                layer.open({
                    type: 2,
                    title: title,
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['800px', '520px'],
                    content: '{:U("advice/showadvice")}&advice_id=' + advice_id
                });
            }          
        </script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="{:U('index/index')}">首页</a></li>
			<li><a href="{:U('advice/index')}">意见&建议</a></li>
		</ul>
    </div>
    
    <div class="formbody">
		<ul class="toolbar">

		</ul> 
		<form name="seachform" id="seachform" action="{:U('advice/index')}" method="post">
			<ul class="seachform">
				<li><label>综合查询</label><input name="info[keyword]" id="keyword" value="{$keyword}" type="text" class="scinput" /></li>	
				<li><label>类型</label>
                        <div class="vocation">
                            <select id="red_type" name="info[type]">
                                <option value="">请选择类型</option>     
                                <option value="0" <?php if($type=='0'):?>selected<?php endif;?> >条件一</option>
								<option value="1"  <?php if($type=='1'):?>selected<?php endif;?>>条件二</option>
								<option value="2" <?php if($type=='2'):?>selected<?php endif;?> >条件三</option>
                              
                            </select>
                        </div>
                    </li>				
				<li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
			</ul>
		</form>
		
		<table class="tablelist">
			<thead>
				<tr>
					<th><input name="" type="checkbox" value="" checked /></th>
					<th>编号</th>
					<th>用户名</th>
					<th>类型</th>
					<th>标题</th>
					<th>意见</th>
					<th>提交时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			   
				<volist name="listinfo" id="advice">
				<tr>
					<td><input name="" type="checkbox" value="" /></td>
					<td>{$advice.advice_id}</td>
					<td>{$advice['username']}</td>
					<td>{$advice["advice_type"]==0?"<font color=red>条件一</font>":"<font color=green>条件二</font>"}</td>
					<td>{$advice.advice_title}</td>
					<td>{$advice.advice_content}</td>
					<td>{$advice.advice_date|date="Y-m-d H:i:s",###}</td>
					<td>
						<a href="javascript:showadvice({$advice.advice_id},'{$advice.advice_title}');" class="tablelink">查看</a>					
						<if condition="$admin.admin_id neq 1 ">
						<a href="{:U('advice/deladvice',array('advice_id'=>$advice['advice_id']))}" onclick="{if(confirm('确认删除?')){return true;}return false;}" class="tablelink">删除</a>
						</if>
					</td>
				</tr> 
				</volist>
			</tbody>
		</table>
		{$pageshow}
    </div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>

</html>
